package org.demo.jvm.gc.market;

import java.util.Scanner;

/**
 * 清除标记法
 */
public class CleanMarket {

    private CleanMarket quo;

    public CleanMarket() {
        byte[] data = new byte[20 * 1024 * 1024];
    }

    public static void main(String[] args) {
        CleanMarket market1 = new CleanMarket();
        CleanMarket market2 = new CleanMarket();
        market1.quo = market2;
        market2.quo = market1;

        market1 = null;
        market2 = null;
        Scanner scanner = new Scanner(System.in);
        String next = scanner.next();
        System.err.println(next);
        System.gc();
    }

}
